package com.xsd.builder;

/**
 * @Description: 客户端
 * @Author: zhoufuzong
 * @Created: 2021-02-13 21:42:49
 * @Version: 1.1.0
 */

public class Cilent {
    public static void main(String[] args) {
        CommonHouse commonHouse = new CommonHouse();
        HouseDirect houseDirect = new HouseDirect(commonHouse);
        House  house = houseDirect.constructureHouse();
        System.out.println(house.hashCode());

        // 高楼
        System.out.println("___________");

        HighBuilding highBuilding = new HighBuilding();
        houseDirect.setBuilder(highBuilding);
        House house2 = houseDirect.constructureHouse();
        System.out.println(house2.hashCode());
    }
}
